Skip to content

docs(runtime): correct public imports and composition entry point - #5142

Open
MasamiYui wants to merge 1 commit into
apache:mainfrom
MasamiYui:codex/docs-runtime-public-api
Open

docs(runtime): correct public imports and composition entry point#5142
MasamiYui wants to merge 1 commit into
apache:mainfrom
MasamiYui:codex/docs-runtime-public-api

Conversation

@MasamiYui

Copy link
Copy Markdown
Member

Summary

The Runtime README described a supported package-root import even though @maka/runtime has no root export, and pointed contributors to Desktop main for Runtime composition.

This corrects both root-barrel references, adds explicit SessionManager and AiSdkBackend subpath import examples, and links the shared Runtime Host execution composition. The change is limited to packages/runtime/README.md; runtime behavior is unchanged.

Fixes #5141

Verification

Verified on macOS 26.6.2 / Node.js v23.7.0, against base f09119884 and this branch:

  • Actual import('@maka/runtime') rejects with ERR_PACKAGE_PATH_NOT_EXPORTED, confirming the existing documentation defect.
  • Both README example subpaths match the package export map and resolve to their declared targets; both named classes exist in the corresponding source modules.
  • Both added relative links resolve to existing files.
  • The linked Runtime Host composition constructs SessionManager and BackendRegistry.
  • git diff --check HEAD^ HEAD passes.
  • Inspected the actual GitHub Markdown rendering before and after the change.

The subpath checks cover resolution and source declarations, not execution of compiled Runtime modules. Full lint, formatter, typecheck, build, and workspace test suites were not run for this Markdown-only change.

Before and after screenshots — actual GitHub Markdown preview

Beforebase README

Runtime README before correction

Afterupdated README

Runtime README after correction

Screenshots are stored on a separate evidence branch in the fork and are not part of this PR's file changes.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex inspected the package exports and composition, edited the README, ran the focused verification, and captured the screenshots. The commit includes Generated-by: OpenAI Codex.

Automated PR submission by OpenAI Codex on behalf of @MasamiYui, the human contributor of record.

Checklist

  • Tests cover the change and fail without it — N/A for runtime regression tests; this changes documentation only.
  • Lint, format, typecheck and the affected suites pass locally — full suites not run; focused documentation checks are listed above.

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 10, 2026

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR 5142 Review

结论

APPROVE
Docs-only:packages/runtime/README.md 的 root-barrel 误述(@maka/runtime 实际无 root export)已修正,补上可解析的 subpath 导入示例,并把 composition 指针从 Desktop main 换到真正的共享 composition 文件。

发现

[P3] 与 #5165#5200 修同一缺陷、同一文件(issue #5141),三者不能同时合并

  • 文件: packages/runtime/README.md
  • 问题:本 PR、#5165#5200 都只改 packages/runtime/README.md 的 "Public seam" 段,修的是同一个 root-barrel 误述(同一 issue #5141)。三个 PR 不能同时合并,后合者会因同段改动产生 diff 冲突。
  • 建议:维护者三选一合并,其余关闭即可。三者内容无分歧、本 PR 改动最克制。纯流程提示,不影响本 PR 技术正确性。

验证

  • package.json#exports'.' 键 → root 确实不导出,原文档说法确为缺陷。
  • ./session-manager./dist/session-manager.js./ai-sdk-backend./dist/ai-sdk-backend.js,两个 subpath 均声明存在。
  • SessionManagersrc/session-manager.ts:898)、AiSdkBackendsrc/ai-sdk-backend.ts:283)真实导出,示例导入的两个命名都存在。
  • 新增相对链接指向的 packages/runtime-host/src/server/execution-composition.ts 存在,且其中确实构造 SessionManager/BackendRegistry
  • 仅删除被证伪的 root-barrel 声明并补正确 subpath,无多余抽象。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(runtime): README advertises an unexported package root and stale composition entry point

2 participants